package com.nccs.design.modo.filterchain;

/**
 * @author xuzengsheng
 * @program nssc-parent
 * @createTime 2021-11-17- 19:47:00
 * @description 设计模式-- 责任链模式
 */

public class HaveBreakfastFilter implements StudyPrepareFilter {

    @Override
    public void doFilter(PreparationList preparationList, FilterChain filterChain) {
        if (preparationList.isHaveBreakfast()) {
            System.out.println("吃完早饭");
            //filterChain.doFilter(preparationList, filterChain);
        } else {
            System.out.println("未吃完饭");
        }
        filterChain.doFilter(preparationList, filterChain);

    }

}
